#define _CRT_SECURE_NO_WARNINGS 1
struct ListNode* getIntersectionNode(struct ListNode* headA, struct ListNode* headB) {
    struct ListNode* curA = headA;
    struct ListNode* curB = headB;

    if (curA == curB)
        return curA;

    for (; curA != NULL; curA = curA->next)
    {
        for (curB = headB; curB != NULL; curB = curB->next)
        {
            if (curA == curB)
            {
                return curA;
            }
        }
    }

    return NULL;
}